package campfirelighter.model {
	import campfirelighter.utils.ISODateUtil;
	
	
	/**
	 * @author Danny Patterson
	 */
	public class Room implements IXMLDeserializable {
		
		[Bindable]
		public var id:uint;
		[Bindable]
		public var membershipLimit:uint;
		[Bindable]
		public var name:String;
		[Bindable]
		public var topic:String;
		[Bindable]
		public var updatedAt:Date;
		[Bindable]
		public var createdAt:Date;
		
		public function Room() {}
		
		public function xmlDeserialize(room:XML):void {
			id = parseInt(room.id.toString());
			membershipLimit = parseInt(room["membership-limit"].toString());
			name = room.name.toString();
			topic = room.topic.toString();
			updatedAt = ISODateUtil.parseISODate(room.updatedAt.toString());
			createdAt = ISODateUtil.parseISODate(room.createdAt.toString());
		}
		
	}
	
}